package com.example.typeConversion;

/**
 * 强制类型转换
 */
public class TypeConversionDemo03 {
    public static void main(String[] args) {
        int a=20;
        byte b= (byte) a; // ALT + ENTER 强制类型转换
        System.out.println(a);
        System.out.println(b);

        int i=1500;
        byte j= (byte) i;
        System.out.println(i);
        System.out.println(j);

        double d=99.98;
        int m= (int) d;
        System.out.println(d);
        System.out.println(m);
    }
}
